<?php
/**
 * Yiihoo CMS config for main application
 *
 * @category  Yii Template
 * @author    Dmitry Konovalchuk <konovalchuk@ebola.com.ua>
 * @copyright 2013 Ebola Communications
 * @link      http://www.ebola.com.ua/
 */
$dir       = dirname(__FILE__);
$protected = realpath($dir . '/..');
$cms       = realpath($protected . '/vendor/yiihoo-cms');

return array(
    'aliases' => array(
        'cms' => $cms,
    ),

    'import' => array(
        'cms.modules.core.behaviors.*',
        'cms.modules.core.components.*',
        'cms.modules.core.helpers.*',
        'cms.modules.core.models.*',
        'cms.modules.core.widgets.*',
    ),

    'components' => array(
        'urlManager' => array(
            'class' => 'YUrlManager',
            'rules' => array(
                '<_lang:\w{2}>'                => 'site/index',
                '<_lang:\w{2}>/<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>',
                '<_lang:\w{2}>/<_c>/<_a>'      => '<_c>/<_a>',
            ),
        ),
    ),

    'modules' => array(
        'core' => array(
            'class' => 'cms.modules.core.YCoreModule',
        ),
    ),
);
